xen.git
20 years agoPush the process of waiting for devices to come up right out of DevController,
emellor@leeni.uk.xensource.com [Tue, 8 Nov 2005 02:34:23 +0000 (03:34 +0100)]
Push the process of waiting for devices to come up right out of DevController,
and drive this process from xm create.  Architecturally, this separates the
process of domain creation from the process of waiting for devices, allowing
tools to choose when to perform that wait (if at all).  This places the waiting
in the same category as the unpause after domain creation, architecturally.

The main advantage to this approach is that it takes waiting for devices out
of the scope of XendDomain's domains_lock.  When restarting a domain, the
watch would fire for @releaseDomain while we were waiting for new domains to
come up.  This would deadlock the watch thread, as no more new watches could
be delivered.  Closes bug #387.

In the longer term, we expect to be able to wait for devices to come up
completely, not simply to wait for the hotplug scripts to run, and so it is
necessary then to move the waiting procedure right out of the server, so that
it can be performed after the domain unpause.  Without unpausing the domain,
the frontends will not come up, and so we cannot detect successful device
completion.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRearrange restart logic so that a failure to restart a domain does not cause
emellor@leeni.uk.xensource.com [Tue, 8 Nov 2005 02:07:57 +0000 (03:07 +0100)]
Rearrange restart logic so that a failure to restart a domain does not cause
cascading secondary errors.  Fixes bug #384.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMark plenty of variables as unused, and remove an unused import.
emellor@leeni.uk.xensource.com [Tue, 8 Nov 2005 01:51:34 +0000 (02:51 +0100)]
Mark plenty of variables as unused, and remove an unused import.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove unused XENSTORED_XYZ constants.
emellor@leeni.uk.xensource.com [Tue, 8 Nov 2005 00:26:16 +0000 (01:26 +0100)]
Remove unused XENSTORED_XYZ constants.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRename parameter to avoid shadowing builtin.
emellor@leeni.uk.xensource.com [Mon, 7 Nov 2005 20:22:02 +0000 (21:22 +0100)]
Rename parameter to avoid shadowing builtin.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Mon, 7 Nov 2005 14:06:27 +0000 (15:06 +0100)]
Merged.

20 years agoAdded description of the behaviour of rename-restart.
emellor@leeni.uk.xensource.com [Mon, 7 Nov 2005 14:06:00 +0000 (15:06 +0100)]
Added description of the behaviour of rename-restart.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFixed syntax error in iopif patch.
jbulpin@wicket.uk.xensource.com [Mon, 7 Nov 2005 12:04:27 +0000 (13:04 +0100)]
Fixed syntax error in iopif patch.

Signed-off-by: James Bulpin <james@xensource.com>
20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Mon, 7 Nov 2005 11:53:38 +0000 (12:53 +0100)]
merge

20 years agofast_flush_area() should index the unmap request array using
kaf24@firebug.cl.cam.ac.uk [Mon, 7 Nov 2005 11:52:49 +0000 (12:52 +0100)]
fast_flush_area() should index the unmap request array using
invcount, not i. Also, fix initialisation of pending_grant_handles:
it was happening too late, and the use of memset() was bogus.

Signed-off-by: Harry Butterworth <butterwo@uk.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMove the randomMAC method from xm.create into server.netif. This way, it can
emellor@leeni.uk.xensource.com [Mon, 7 Nov 2005 11:36:53 +0000 (12:36 +0100)]
Move the randomMAC method from xm.create into server.netif.  This way, it can
be shared with other command line tools, and the xm network-attach command.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix misnamed call to legacy_mask_to_prefix. Thanks to Tim Moreton for finding
emellor@leeni.uk.xensource.com [Mon, 7 Nov 2005 11:36:44 +0000 (12:36 +0100)]
Fix misnamed call to legacy_mask_to_prefix.  Thanks to Tim Moreton for finding
this.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDiagnostic for hitting the nloopbacks limit. This is presumably the cause of
emellor@leeni.uk.xensource.com [Mon, 7 Nov 2005 11:36:35 +0000 (12:36 +0100)]
Diagnostic for hitting the nloopbacks limit.  This is presumably the cause of
all the "two bridges don't work" bugs that have been reported (bug #381).

Consideration will be given to raising the default limit -- this is just a
diagnostic of the problem.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoWholesale import of xm-test 0.4.0.
emellor@leeni.uk.xensource.com [Mon, 7 Nov 2005 11:36:16 +0000 (12:36 +0100)]
Wholesale import of xm-test 0.4.0.

This is not yet integrated with the rest of the Xen build system.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoHack around problem whereby VMX domains (using the ioemu device) now fail
emellor@leeni.uk.xensource.com [Mon, 7 Nov 2005 11:35:06 +0000 (12:35 +0100)]
Hack around problem whereby VMX domains (using the ioemu device) now fail
because the new hotplug script error checking kicks in.

ioemu really ought to move out of blkif.py.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded assertion, to stop it blowing up more obscurely a little later.
emellor@leeni.uk.xensource.com [Mon, 7 Nov 2005 11:30:35 +0000 (12:30 +0100)]
Added assertion, to stop it blowing up more obscurely a little later.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoTidy exception handling on IntroduceDomain, quieten down one debug message, add
emellor@leeni.uk.xensource.com [Mon, 7 Nov 2005 11:30:16 +0000 (12:30 +0100)]
Tidy exception handling on IntroduceDomain, quieten down one debug message, add
another.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMake xenstored reopen its trace file on SIGHUP. This allows one to rotate the
emellor@leeni.uk.xensource.com [Mon, 7 Nov 2005 11:28:53 +0000 (12:28 +0100)]
Make xenstored reopen its trace file on SIGHUP.  This allows one to rotate the
logs beneath the daemon.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdd support for the ioport_permission dom0 op to xend and xm
kaf24@firebug.cl.cam.ac.uk [Mon, 7 Nov 2005 11:05:15 +0000 (12:05 +0100)]
Add support for the ioport_permission dom0 op to xend and xm

xm now accepts a parameter 'ioports' that accepts a hex ioport
or ioport range, in the form 02f8[-02ff]

Signed-off-by: Jody Belka <knew (at) pimb (dot) org>
20 years agoRevert c/s 7626 -- it's missing a new file.
kaf24@firebug.cl.cam.ac.uk [Sun, 6 Nov 2005 18:50:33 +0000 (19:50 +0100)]
Revert c/s 7626 -- it's missing a new file.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix error path in blkback driver where a grant mapping in the
kaf24@firebug.cl.cam.ac.uk [Sun, 6 Nov 2005 16:50:24 +0000 (17:50 +0100)]
Fix error path in blkback driver where a grant mapping in the
middle of a batch fails. Spotted by Harry Butterworth (IBM).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd support for the ioport_permission dom0 op to xend and xm
kaf24@firebug.cl.cam.ac.uk [Sun, 6 Nov 2005 15:40:33 +0000 (16:40 +0100)]
Add support for the ioport_permission dom0 op to xend and xm

xm now accepts a parameter 'ioports' that accepts a hex ioport
or ioport range, in the form 02f8[-02ff]

Signed-off-by: Jody Belka <knew (at) pimb (dot) org>
20 years agoAdded domain_ioport_permission to the python module xen.lowlevel.xc,
kaf24@firebug.cl.cam.ac.uk [Sun, 6 Nov 2005 15:40:15 +0000 (16:40 +0100)]
Added domain_ioport_permission to the python module xen.lowlevel.xc,
wrapping the equivalent libxc call

Signed-off-by: Jody Belka <knew (at) pimb (dot) org>
20 years agoAdded xc_domain_ioport_permission to libxc, which wraps the dom0 op
kaf24@firebug.cl.cam.ac.uk [Sun, 6 Nov 2005 15:39:55 +0000 (16:39 +0100)]
Added xc_domain_ioport_permission to libxc, which wraps the dom0 op

Signed-off-by: Jody Belka <knew (at) pimb (dot) org>
20 years agoThis patch adds a new boot parameter, dom0_ioports_disable, which
kaf24@firebug.cl.cam.ac.uk [Sun, 6 Nov 2005 15:39:02 +0000 (16:39 +0100)]
This patch adds a new boot parameter, dom0_ioports_disable, which
accepts a comma seperated list of hex ioports and/or ioport ranges
(eg. dom0_ioports_disable=02f8-02ff,03f8-03ff), and applies them to dom0.

Signed-off-by: Jody Belka <knew (at) pimb (dot) org>
20 years agoThis patch is intended to make qemu support ia64/vti. We have validated
kaf24@firebug.cl.cam.ac.uk [Sat, 5 Nov 2005 10:30:01 +0000 (11:30 +0100)]
This patch is intended to make qemu support ia64/vti. We have validated
it against latest xen-unstable.hg, both ia32 and x86-64 are not
affected.

Signed-off-by Ke Yu <ke.yu@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>
Signed-off-by Nakajima Jun <nakajima.jun@intel.com>
Signed-off-by Anthony Xu <anthony.xu@intel.com>

20 years ago This patch is to remove the pit_timer when the vmx domain is
kaf24@firebug.cl.cam.ac.uk [Sat, 5 Nov 2005 10:26:29 +0000 (11:26 +0100)]
    This patch is to remove the pit_timer when the vmx domain is
inactive to save HV external IRQ caused by ac_time and some cleanup for
ioapic in HV.
Thx,eddie

Signed-off-by: Eddie Dong <eddie.dong@intel.com>
20 years agovlapic_init alloc memory for struct vlapic, so it should do a memset on
kaf24@firebug.cl.cam.ac.uk [Sat, 5 Nov 2005 10:23:02 +0000 (11:23 +0100)]
vlapic_init alloc memory for struct vlapic, so it should do a memset on
it, not vlapic_reset.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoQuiet down balloon driver.
smh22@firebug.cl.cam.ac.uk [Sat, 5 Nov 2005 09:55:38 +0000 (10:55 +0100)]
Quiet down balloon driver.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoCheck correct flag in grant transfer - this eliminates the most common
smh22@firebug.cl.cam.ac.uk [Sat, 5 Nov 2005 09:54:12 +0000 (10:54 +0100)]
Check correct flag in grant transfer - this eliminates the most common
source of 'zombie-' domains.

Signed-off-by: Steven Hand <steven@xensource.com>
20 years agoRemove shadow audit debugging. Too noisy for
kaf24@firebug.cl.cam.ac.uk [Fri, 4 Nov 2005 15:01:49 +0000 (16:01 +0100)]
Remove shadow audit debugging. Too noisy for
log-dirty mode.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoSpecifying 'mem=' as Linux boot parameter disables the default
kaf24@firebug.cl.cam.ac.uk [Fri, 4 Nov 2005 10:46:10 +0000 (11:46 +0100)]
Specifying 'mem=' as Linux boot parameter disables the default
8MB slack in the mem_map and the p2m table.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThis is a fix for some device model corner cases including:
kaf24@firebug.cl.cam.ac.uk [Fri, 4 Nov 2005 10:08:45 +0000 (11:08 +0100)]
This is a fix for some device model corner cases including:
 1: mistake sequence of set/clr to virtual IRQ line.
 2: wrong sequence of IRQ request clear
 3: Add one more place to enable_irq_window.

Signed-off-by: Eddie Dong <eddie.dong@intel.com>
20 years agoThis patch adds a check to make sure the config file passed to
kaf24@firebug.cl.cam.ac.uk [Fri, 4 Nov 2005 10:06:41 +0000 (11:06 +0100)]
This patch adds a check to make sure the config file passed to
vnet-create is correct.  This is better than throwing IOError, because
IOError's are currently reported as xend communication failures.
Also, fix the IOError handling at the end of the file so we don't get
a stack dump if that path is taken.

Signed-off-by: Dan Smith <danms@us.ibm.com>
20 years agoThis is another patch that adds an arg_check() to domid and domname so
kaf24@firebug.cl.cam.ac.uk [Fri, 4 Nov 2005 10:05:10 +0000 (11:05 +0100)]
This is another patch that adds an arg_check() to domid and domname so
that we don't dump stack if a user runs either without an argument.

Signed-off-by: Dan Smith <danms@us.ibm.com>
20 years agoThis patch adds an arg_check into the set_vcpus code in xm, so that we
kaf24@firebug.cl.cam.ac.uk [Fri, 4 Nov 2005 10:03:20 +0000 (11:03 +0100)]
This patch adds an arg_check into the set_vcpus code in xm, so that we
don't output a stack trace if <2 arguments are passed.

Signed-off-by: Dan Smith <danms@us.ibm.com>
20 years agoSimplified vmx_platform.c by removing obsolete code and redundant vmread's.
kaf24@firebug.cl.cam.ac.uk [Thu, 3 Nov 2005 08:58:45 +0000 (09:58 +0100)]
Simplified vmx_platform.c by removing obsolete code and redundant vmread's.

Signed-Off-By: Leendert van Doorn <leendert@watson.ibm.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Thu, 3 Nov 2005 01:45:07 +0000 (02:45 +0100)]
Merged.

20 years agoFix handling of child in forkHelper.
emellor@leeni.uk.xensource.com [Thu, 3 Nov 2005 01:44:41 +0000 (02:44 +0100)]
Fix handling of child in forkHelper.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix map_domain_page() by reverting a bogus simplification
kaf24@firebug.cl.cam.ac.uk [Wed, 2 Nov 2005 18:12:30 +0000 (19:12 +0100)]
Fix map_domain_page() by reverting a bogus simplification
that I committed in changeset 5303:d68bc64e2cfe38a85483a8c5d349b4ee45e91fb9
This fixes some very weird and nasty Xen crashes.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerge.
sos22@douglas.cl.cam.ac.uk [Wed, 2 Nov 2005 16:29:32 +0000 (17:29 +0100)]
Merge.

Signed-off-by: Steven Smith, sos22@cam.ac.uk
20 years agoMerged.
emellor@leeni.uk.xensource.com [Wed, 2 Nov 2005 15:43:32 +0000 (16:43 +0100)]
Merged.

20 years agoRewritten handling of child stderr to avoid deadlock.
emellor@leeni.uk.xensource.com [Wed, 2 Nov 2005 15:42:29 +0000 (16:42 +0100)]
Rewritten handling of child stderr to avoid deadlock.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMake the -V option of xenconsoled actually do something.
kaf24@firebug.cl.cam.ac.uk [Wed, 2 Nov 2005 10:25:21 +0000 (11:25 +0100)]
Make the -V option of xenconsoled actually do something.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
20 years agoMake it clear that the result of xs_get_domain_path() must be free()'d.
kaf24@firebug.cl.cam.ac.uk [Wed, 2 Nov 2005 10:25:08 +0000 (11:25 +0100)]
Make it clear that the result of xs_get_domain_path() must be free()'d.

20 years agoFix memory leak in domain cleanup spotted by doremifa in #xen.
kaf24@firebug.cl.cam.ac.uk [Wed, 2 Nov 2005 10:24:49 +0000 (11:24 +0100)]
Fix memory leak in domain cleanup spotted by doremifa in #xen.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
20 years agoThe attached patch to 1) fix a 64-bit bug with some of the data packing,
kaf24@firebug.cl.cam.ac.uk [Wed, 2 Nov 2005 10:21:46 +0000 (11:21 +0100)]
The attached patch to 1) fix a 64-bit bug with some of the data packing,
and 2) adds a workaround for an Infineon TPM hardware bug.

Signed-off-by: Vinnie Scarlata, Joseph Cihula (@intel.com)
20 years agofix VMX decoder for MOVZ instruction.
kaf24@firebug.cl.cam.ac.uk [Wed, 2 Nov 2005 10:19:48 +0000 (11:19 +0100)]
fix VMX decoder for MOVZ instruction.

In VMX decoder, we always assume the 2 operands of x86 instructions are
in the same length, however, MOVZ is an exception.
This patch fixes MOVZ instruction handling.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Dan Xu <dan.d.xu@intel.com>
20 years agoJust some small code cleanup to shadow.c, no logic changed.
kaf24@firebug.cl.cam.ac.uk [Wed, 2 Nov 2005 10:18:51 +0000 (11:18 +0100)]
Just some small code cleanup to shadow.c, no logic changed.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoChangeset 7419 introduced a check for DOM0 before setting a bit in the
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 23:08:01 +0000 (00:08 +0100)]
Changeset 7419 introduced a check for DOM0 before setting a bit in the
cpu_present map.  This prevents domU SMP kernels without HOTPLUG_CPU
support from booting.  Secondary cpus need to be present and online
before init/main.c:do_basic_setup() calls init_workqueues() (which
initializes per-cpu workqueues).

Without this patch, non HOTPLUG_CPU enabled kernels hang when flushing
cpu workqueues as the spinlock in the structure is never initialized (it
has a default value of zero which means the lock has been acquired on
x86).

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years ago>I'm hitting an ASSERT in alloc_monitor_pagetable() with debug=y and I
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 18:13:06 +0000 (19:13 +0100)]
>I'm hitting an ASSERT in alloc_monitor_pagetable() with debug=y and I
>can reproduce the condition when debug isn't on. The monitor_table is
>not zeroed when entering alloc_monitor_pagetable() - this happens when I
>create a vmx guest. I'm not sure why this happening at first glance.
>File: xen/arch/x86/shadow32.c
>Line: 689
>System: VT/VMX FC3 x86_32 (I can reproduce on FC4 x86_64 too)
>ASSERT(pagetable_get_paddr(v->arch.monitor_table) == 0);

Solution:
What happens is that the monitor page table is not zeroed out
during the initial setup for VMX guests.  As a result, at a later
time when we enable shadow mode for these VMX guests, we trip on
the ASSERT problem above.  To fix this, we just need to initialize
the monitor page table to 0 before calling vmx_final_setup_guest()
and enabling shadow mode.

20 years agoFix 'nosmp' and ensure that CPU#0 is reported properly
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 16:49:19 +0000 (17:49 +0100)]
Fix 'nosmp' and ensure that CPU#0 is reported properly
by /proc/cpuinfo. Also fix the sibling and core maps.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoTemporary fix for blkfront failure on save/restore.
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 15:44:25 +0000 (16:44 +0100)]
Temporary fix for blkfront failure on save/restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix CPU hotplug -- cpu initialisation functions must be declared
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 15:28:20 +0000 (16:28 +0100)]
Fix CPU hotplug -- cpu initialisation functions must be declared
__cpuinit or later hotplug references freed code and data.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Tue, 1 Nov 2005 15:02:43 +0000 (16:02 +0100)]
Merged.

20 years agoCatch KeyboardInterrupt, to avoid spewing error messages on Ctrl-C.
emellor@leeni.uk.xensource.com [Tue, 1 Nov 2005 14:57:19 +0000 (15:57 +0100)]
Catch KeyboardInterrupt, to avoid spewing error messages on Ctrl-C.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded missing __init__.py.
emellor@leeni.uk.xensource.com [Tue, 1 Nov 2005 14:24:47 +0000 (15:24 +0100)]
Added missing __init__.py.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMake SMP alternatives work under xenolinux rather than just native,
sos22@douglas.cl.cam.ac.uk [Tue, 1 Nov 2005 12:38:20 +0000 (13:38 +0100)]
Make SMP alternatives work under xenolinux rather than just native,
since part of it seems to have gotten lost.

Signed-off-by: Steven Smith, sos22@cam.ac.uk
20 years agoDisable guest firmware apm since no apm is supported now to remove the
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 09:37:07 +0000 (10:37 +0100)]
Disable guest firmware apm since no apm is supported now  to remove the
apm handle idle request error when guest os boot

Signed-off-by: Winston Wang <winston.l.wang@intel.com>
20 years agoThe following patch adds a section for SHUTDOWN OPTIONS for the xmdomain.cfg
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 09:36:19 +0000 (10:36 +0100)]
The following patch adds a section for SHUTDOWN OPTIONS for the xmdomain.cfg
man page.  It documents the new set of options introduced over the last few
weeks.

Signed-off-by: Sean Dague <sean@dague.net>
20 years agoFix docs: xm set-mem => xm mem-set.
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 09:34:34 +0000 (10:34 +0100)]
Fix docs: xm set-mem => xm mem-set.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
20 years agoThere is an error in xenstat, such that a wild pointer is being
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 09:33:22 +0000 (10:33 +0100)]
There is an error in xenstat, such that a wild pointer is being
dereferenced and written to.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
20 years agoFix the DISPLAY configration that breaks vmx domain creation with SDL
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 09:31:25 +0000 (10:31 +0100)]
Fix the DISPLAY configration that breaks vmx domain creation with SDL
on vncserver or remote X. Changeset 7547 added a test of
opts.vals.display when getenv("DISPLAY"); because there is a default
value:localhost:0, that causes the test always to be true.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
20 years agoAdd get_cycles(), to be defined in asm/time.h, as a
kaf24@firebug.cl.cam.ac.uk [Tue, 1 Nov 2005 09:28:41 +0000 (10:28 +0100)]
Add get_cycles(), to be defined in asm/time.h, as a
generic method to access cpu-specific local cycle counter.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 16:14:59 +0000 (17:14 +0100)]
Merged.

20 years agoMake check_pkgs work with the Bourne shell
kaf24@firebug.cl.cam.ac.uk [Mon, 31 Oct 2005 16:11:24 +0000 (17:11 +0100)]
Make check_pkgs work with the Bourne shell

20 years agoFrom Murillo Fernandes Bernardes <mfb@br.ibm.com>:
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 16:10:57 +0000 (17:10 +0100)]
From Murillo Fernandes Bernardes <mfb@br.ibm.com>:

The problem is: There is no mechanism to detect block device setup failure

Network devices have the same problem, and are fixed with this too.

I handling this problem in the way suggested by aliguori:
- hotplug scripts write a "hotplug-status" node on store
- Xend DevController.createDevice() check verify this node and return success
or throw an exception on failure.
- If no changes in "hotplug-status" node after DEVICE_CREATE_TIMEOUT seconds
Xend throw an exception showing the problem with hotplug scripts.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoUpdate .hgignore.
kaf24@firebug.cl.cam.ac.uk [Mon, 31 Oct 2005 16:10:41 +0000 (17:10 +0100)]
Update .hgignore.

20 years agoFix PAE shadow on a machine with RAM above 4G on x86_64 xen.
kaf24@firebug.cl.cam.ac.uk [Mon, 31 Oct 2005 16:08:54 +0000 (17:08 +0100)]
Fix PAE shadow on a machine with RAM above 4G on x86_64 xen.
Currently, on a machine with RAM above 4G, we can not run 32bit VMX
guest on x86_64 xen, the root cause is that the PAE page table PDPT must
below 4G, this patch fixes this issue.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
20 years agoWatch events may get lost, the xenstored response races against the new
kaf24@firebug.cl.cam.ac.uk [Mon, 31 Oct 2005 16:07:14 +0000 (17:07 +0100)]
Watch events may get lost, the xenstored response races against the new
watch being added to the watch list in register_xenbus_watch().  Fixed
by adding the watch to the list unconditionally, and remove it in the
error case.

20 years agoFrom Gerd Knorr <kraxel@suse.de>:
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 16:03:13 +0000 (17:03 +0100)]
From Gerd Knorr <kraxel@suse.de>:

Watch events may get lost, the xenstored response races against the new
watch being added to the watch list in register_xenbus_watch().  Fixed
by adding the watch to the list unconditionally, and remove it in the
error case.

That one fixes the network issues I'm seeing.  Due to the race the
"online" hotplug event for the vif backend was lost sometimes.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded new xentrace executables tbctl and setsize.
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 16:01:31 +0000 (17:01 +0100)]
Added new xentrace executables tbctl and setsize.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoUse _p to fix, once and for all, the debugging printf recently changed.
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 15:59:15 +0000 (16:59 +0100)]
Use _p to fix, once and for all, the debugging printf recently changed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemoved the event server, and all it entails. This is unused, and a big pile
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 15:56:34 +0000 (16:56 +0100)]
Removed the event server, and all it entails.  This is unused, and a big pile
of crusty rubbish.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemoved some dead code.
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 15:54:05 +0000 (16:54 +0100)]
Removed some dead code.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoIgnore the directories containing generated man pages.
emellor@leeni.uk.xensource.com [Mon, 31 Oct 2005 11:05:49 +0000 (12:05 +0100)]
Ignore the directories containing generated man pages.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoSanitise the trace-buffer hypervisor<->user interface.
kaf24@firebug.cl.cam.ac.uk [Mon, 31 Oct 2005 09:45:31 +0000 (10:45 +0100)]
Sanitise the trace-buffer hypervisor<->user interface.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove stupid unused strtok() function.
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 22:30:41 +0000 (23:30 +0100)]
Remove stupid unused strtok() function.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoSimplify trace header some more, and ensure that
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 22:28:32 +0000 (23:28 +0100)]
Simplify trace header some more, and ensure that
construction of arguments for tracing is outlined from
straightline code paths.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoTracing cleanups and simplify tb_set_size(). Dynamic
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 22:17:58 +0000 (23:17 +0100)]
Tracing cleanups and simplify tb_set_size(). Dynamic
buffer shrinking is unsafe without heavier weight SMP
synchronisation.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove trace compile option from Xen.
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 21:35:06 +0000 (22:35 +0100)]
Remove trace compile option from Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThis is a set of changes which allow the tracebuffer functionality to
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 21:31:45 +0000 (22:31 +0100)]
This is a set of changes which allow the tracebuffer functionality to
be enabled and disabled dynamically while the system is running. The
existing DOM0_TBUFCONTROL hypercall is used, and three new operations
have been added: enable, disable, and set_size. This is to address
concerns that use of the trace buffers impacts system performance.

The initial value of opt_tbuf_size is set to zero, so that trace
buffers remain disabled by default. They can be enabled as they used
to be, by adding tbuf_size= to the xen command line at boot time. They
can also be turned on and off any time when the system is running. The
size of the trace buffer allocation can also be changed dynamically
while the system is running. The trace buffers may be completely
deallocated by setting the size to zero. No change in buffer size can
be done while tracing is enabled;

Other Changes made:
 - Update the constants in tools/xentrace/formats to match those in
public/trace.h
 - libxc functions for enable/disable, get/set size
Still left to do:
 - remove all ifdef's for trace buffers and the 'trace' build option
 - xm command to do enable/disable trace buffers and get/set size

Signed-off-by: Rob Gardner <rob.gardner@hp.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 18:23:36 +0000 (19:23 +0100)]
Merged.

20 years agoTry again to get the ptrdiff_t printf right for 64-bit.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 18:22:31 +0000 (19:22 +0100)]
Try again to get the ptrdiff_t printf right for 64-bit.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years ago--- xen-unstable.hg.copy/docs/Makefile 2005-10-28 18:36:33.000000000 -0700
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 16:20:09 +0000 (17:20 +0100)]
--- xen-unstable.hg.copy/docs/Makefile 2005-10-28 18:36:33.000000000 -0700
+++ xen-unstable.hg/docs/Makefile 2005-10-28 14:58:18.000000000 -0700
@@ -1,5 +1,6 @@
 #!/usr/bin/make -f

+VERSION = xen-unstable
 INSTALL = install
 INSTALL_DIR = $(INSTALL) -d -m0755

@@ -9,9 +10,15 @@
 FIG2DEV := fig2dev
 LATEX2HTML := latex2html
 DOXYGEN := doxygen
+POD2MAN := pod2man

 pkgdocdir := /usr/share/doc/xen
+mandir := /usr/share/man

+DOC_MAN5SRC := $(wildcard man/*.pod.5)
+DOC_MAN1SRC := $(wildcard man/*.pod.1)
+DOC_MAN1 := $(patsubst man/%.pod.1,man1/%.1,$(DOC_MAN1SRC))
+DOC_MAN5 := $(patsubst man/%.pod.5,man5/%.5,$(DOC_MAN5SRC))
 DOC_TEX := src/user.tex src/interface.tex
 DOC_PS := $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
 DOC_PDF := $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
@@ -22,7 +29,7 @@
 .PHONY: all build dev-docs python-dev-docs ps pdf html clean install

 all: build
-build: ps pdf html
+build: ps pdf html man-pages
  rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc

 dev-docs: python-dev-docs
@@ -43,17 +50,36 @@
  $(MAKE) -C api/tools/python/latex ; else                   \
         echo "Doxygen not installed; skipping python-dev-docs."; fi

+man-pages:
+ @if which $(POD2MAN) 1>/dev/null 2>/dev/null; then \
+ $(MAKE) $(DOC_MAN1) $(DOC_MAN5); fi
+
+man1/%.1: man/%.pod.1 Makefile
+ $(INSTALL_DIR) $(@D)
+ $(POD2MAN) --release=$(VERSION) --name=`echo $@ | sed 's/^man1.//'| \
+ sed 's/.1//'` -s 1 -c "Xen" $< $@
+
+man5/%.5: man/%.pod.5 Makefile
+ $(INSTALL_DIR) $(@D)
+ $(POD2MAN) --release=$(VERSION) --name=`echo $@ | sed 's/^man5.//'| \
+ sed 's/.5//'` -s 5 -c "Xen" $< $@
+
 clean:
  rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~
  rm -rf *.ilg *.log *.ind *.toc *.bak core
  rm -rf $(GFX) ps pdf html
  rm -rf api
+ rm -rf man5
+ rm -rf man1

 install: all
  rm -rf $(DESTDIR)$(pkgdocdir)
  $(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
  cp -dR ps $(DESTDIR)$(pkgdocdir)
  cp -dR pdf $(DESTDIR)$(pkgdocdir)
+ $(INSTALL_DIR) $(DESTDIR)$(mandir)
+ cp -dR man1 $(DESTDIR)$(mandir)
+ cp -dR man5 $(DESTDIR)$(mandir)
  [ ! -d html ] || cp -dR html $(DESTDIR)$(pkgdocdir)

 pdf/%.pdf: ps/%.ps

20 years agoAdded doccomment.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 16:19:35 +0000 (17:19 +0100)]
Added doccomment.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMove misplaced netif_free declaration.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 16:17:21 +0000 (17:17 +0100)]
Move misplaced netif_free declaration.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years ago This patch is to fix the NIC driven mechanism to make it event
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 15:47:59 +0000 (16:47 +0100)]
    This patch is to fix the NIC driven mechanism to make it event
driven. We will also send it to Qemu mailing list.

Signed-off-by: Eddie Dong <eddie.dong@intel.com>
20 years agoAdded network-attach and network-detach. Fixes bug #300.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 15:44:47 +0000 (16:44 +0100)]
Added network-attach and network-detach.  Fixes bug #300.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoForce the devid given to destroyDevice to an integer. This means that that
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 15:43:52 +0000 (16:43 +0100)]
Force the devid given to destroyDevice to an integer.  This means that that
method copes with the values given to xm network-detach without netif.py having
to intervene.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoOnce grant refs run out, netfront prints a nice message, but doesn't set
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 15:43:05 +0000 (16:43 +0100)]
Once grant refs run out, netfront prints a nice message, but doesn't set
err properly to notify the caller, and the domU crashes. (See bug 183 for
details).

Signed-off-by: Jim Dykman <dykman@us.ibm.com>
20 years agoSmall shadow pagetable fixes.
kaf24@firebug.cl.cam.ac.uk [Sun, 30 Oct 2005 15:40:05 +0000 (16:40 +0100)]
Small shadow pagetable fixes.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Xin B Li <xin.b.li@intel.com>
20 years agoAdded -lpthread to qemu-dm link line, in order to compile even without SDL
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 15:35:06 +0000 (16:35 +0100)]
Added -lpthread to qemu-dm link line, in order to compile even without SDL
installed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoChange the grant table interface so that gnttab_end_foreign_access_ref returns
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 15:33:05 +0000 (16:33 +0100)]
Change the grant table interface so that gnttab_end_foreign_access_ref returns
an error code if the page is still in use, and gnttab_end_foreign_access takes
a page to free.  This allows us to cope with frontends wanting to end access
while backends are still using pages by, eventually, placing the page and
grant table entry on a list, for freeing later.  At the moment, the page and
grant table entry are leaked, with a diagnostic.

Tidied up netfront.c's clean-up code.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded cast to silence warning on 64-bit.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 15:25:52 +0000 (16:25 +0100)]
Added cast to silence warning on 64-bit.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoUse %tx C99 printf modifier for ptrdiff_t so that this builds on 64-bit.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 14:54:15 +0000 (15:54 +0100)]
Use %tx C99 printf modifier for ptrdiff_t so that this builds on 64-bit.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove out: label, to silence warning.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 14:42:02 +0000 (15:42 +0100)]
Remove out: label, to silence warning.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 13:00:35 +0000 (14:00 +0100)]
Merged.

20 years agoDon't schedule work for reboot if work is already scheduled. This fixes a
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:52:38 +0000 (13:52 +0100)]
Don't schedule work for reboot if work is already scheduled.  This fixes a
problem whereby migrated domains would shut themselves down immediately,
because the watch from the removal of the control/shutdown node would fire
after the workqueue had started, but before the domain was suspended, meaning
that an additional piece of work was scheduled, which ran immediately after the
domain was resumed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoChange the interface between XendRoot.get_network_script and Vifctl so that a
emellor@leeni.uk.xensource.com [Sun, 30 Oct 2005 12:48:34 +0000 (13:48 +0100)]
Change the interface between XendRoot.get_network_script and Vifctl so that a
list is passed rather than a single string.  This expands the config-file
interface so that parameters may be passed to the network scripts from the
config file.

Fix XendRoot._logError (missing asterisk before args parameter).

In XendRoot, allow an empty configuration file.  This makes it easier to unit
test code reliant on XendRoot.

Signed-off-by: Ewan Mellor <ewan@xensource.com>